Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linkTools.Vertices): add vertexAdding interactiveLinkNode option #2689

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

kumilingus
Copy link
Contributor

@kumilingus kumilingus commented Jun 8, 2024

Description

The current solution with the linkTools.Vertices and its extra path overlay has several disadvantages. For example, it was not possible to move labels and create vertices at the same time (because an invisible path was rendered above the link and the labels).

This PR allows you to choose an existing node from the link view to serve as an interactive hit area for creating vertices.

Docs

https://docs.jointjs.com/api/linkTools/#vertices

vertexAdding

Can the user add new vertices (by clicking a segment of the link)?

Value Description
false The user can not add new vertices.
true An invisible path is rendered above the link which creates vertices upon interaction with it.
{} See VertexAddingOptions

VertexAddingOptions

Option Description
interactiveLinkNode: string; A selector of an existing link node, e.g. "wrapper". When the node is interacted with, a vertex is created.

The default is true.

const verticesTool = new linkTools.Vertices({ vertexAdding: { interactiveLinkNode: 'outline' }}),

Implements #2688.
Solves: #2370

@kumilingus kumilingus requested a review from Geliogabalus July 11, 2024 09:28
@Geliogabalus Geliogabalus merged commit 97b25eb into clientIO:master Jul 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants